home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / MASM61.RAR / README.TXT < prev    next >
Text File  |  1994-02-09  |  12KB  |  306 lines

  1.  
  2.                                README.DOC File
  3.  
  4.              Release Notes for the Microsoft(R) Macro Assembler
  5.                 Professional Development System, Version 6.1
  6.  
  7.      (C) Copyright 1992, Microsoft Corporation.  All rights reserved.
  8.                                           
  9.      This document contains release notes for version 6.1 of the
  10.      Microsoft Macro Assembler Professional Development System for
  11.      MS-DOS(R).  The information in this document and in the Microsoft 
  12.      Advisor (online help) is more up-to-date than that in the manuals.
  13.   
  14.      Microsoft improves its languages documentation at the time of
  15.      reprinting, so some of the information in this file may already be
  16.      included in your manuals.
  17.  
  18.  
  19.  
  20. ==============================< Contents >================================
  21.  
  22.      This file has 4 parts:
  23.   
  24.                Part     Contents
  25.                ----     --------
  26.                1        Documentation Errata
  27.  
  28.                2        Information on Microsoft CodeView
  29.  
  30.                3        Tips for Using MASM 6.1
  31.  
  32.                4        Known Assembler Bugs
  33.  
  34.  
  35.  
  36. ====================< Part 1: Documentation Errata >======================
  37.  
  38.  
  39.      Reference, Page 98: LEA is no longer optimized
  40.      -------------------------------------------------
  41.      The MASM 6.1 Reference indicates that the LEA instruction is
  42.      encoded as a MOV when the source operand is a direct memory address.
  43.  
  44.      In response to programmer requests, MASM 6.1 no longer performs this 
  45.      optimization automatically.  The optimization can be performed by 
  46.      using the OPATTR operator, as shown in the following macro:
  47.  
  48.           MOVLEA MACRO Dest, Symbol
  49.           IF (OPATTR(Symbol)) AND 08h
  50.                MOV Dest, OFFSET Symbol
  51.           ELSE
  52.                LEA Dest, Symbol
  53.           ENDIF
  54.           ENDM
  55.  
  56.  
  57.      Programmer's Guide, Page 202: User-Defined Epilogues & Prologues
  58.      --------------------------------------------------------------------
  59.      The documentation for user-defined epilogue and prologue code reads
  60.      "Your macro function must return the parmbytes parameter."  It
  61.      should read "...the localbytes parameter."
  62.  
  63.  
  64.      Help for Runtime Error R6921
  65.      ---------------------------------------
  66.      The online help for runtime error R6921 reads "...Possibly the
  67.      CONFIG.SYS file contained a line such as DEVICE=C:\OS\MM386.EXE..."
  68.      The file name should read "C:\DOS\EMM386.EXE".
  69.  
  70.  
  71. ===============< Part 2: Information on Microsoft CodeView >==============
  72.  
  73.      CV.TXT File
  74.      --------------------
  75.      Detailed information on configuring CodeView is in the CV.TXT file,
  76.      in the directory into which you installed MASM.
  77.  
  78.  
  79.      CodeView and 32-bit Registers
  80.      --------------------------------------------------
  81.      CodeView 4.01 does not support single-stepping through code which
  82.      uses 32-bit registers while a DPMI server is present.  Windows 3.1
  83.      and 386-MAX are examples of DPMI servers.  If you need to single-
  84.      step through 32-bit code, you can exit Windows and use a VCPI server 
  85.      such as EMM386.EXE to run CodeView, or use an alternate debugger 
  86.      such as WDEB386 (available in the Microsoft Windows Software 
  87.      Development Kit).
  88.      
  89.  
  90.      CodeView and .COM Files
  91.      --------------------------------------------------
  92.      CodeView 4.01 does not show source code when debugging .COM files.  
  93.      If you need to view source code, build your program as a small-model 
  94.      .EXE for debugging purposes.
  95.  
  96.  
  97. ====================< Part 3: Tips for Using MASM 6.1 >===================
  98.  
  99.      Working with MASM 5.1 Code
  100.      -------------------------------------
  101.      There are differences between MASM 5.1 and MASM 6.1.  Some code
  102.      written for MASM 5.1 will not assemble correctly with MASM 6.1.
  103.      Appendix A of the MASM Programmer's Guide discusses how to work
  104.      with code written for MASM 5.1.
  105.  
  106.  
  107.      SAMPLES.TXT File
  108.      ---------------------------------------------
  109.      The file SAMPLES.TXT is installed if you choose to install the
  110.      sample code during the setup process.  SAMPLES.TXT contains
  111.      information about the purpose of the samples, and about additional
  112.      tools you may need to build some of the samples.
  113.  
  114.  
  115.      ERRMSG.TXT File
  116.      ---------------------------------------------
  117.      The file ERRMSG.TXT is installed in the directory in which you
  118.      installed MASM.  This file contains information about error
  119.      messages which are not documented in the Programmer's Guide or
  120.      the MASM help files.
  121.  
  122.  
  123.      NMAKE and NMAKER
  124.      --------------------
  125.      MASM 6.1 includes two versions of the NMAKE project management 
  126.      utility.  NMAKER.EXE is a real-mode version of the utility.  
  127.      NMAKE.EXE is a driver program which first loads the MS-DOS extender 
  128.      into memory, and then runs NMAKER.EXE.  Using the NMAKE.EXE driver 
  129.      will result in faster build times.  Some development tools from 
  130.      other manufacturers may be incompatible with NMAKE.EXE.  If you 
  131.      encounter incompatibilities, use NMAKER.EXE instead.
  132.  
  133.  
  134.      Working With Microsoft BASIC Far Strings
  135.      ---------------------------------------------
  136.      The BASIC runtime function StringAssign does not correctly handle
  137.      strings of zero length.  Instead of calling StringAssign to convert
  138.      a zero-length string, simply return a near pointer to a doubleword 
  139.      with the value 0.
  140.  
  141.  
  142.      Using Control-C to Halt Operation of MASM
  143.      -----------------------------------------------
  144.      MS-DOS applications running under DPMI, such as ML.EXE, may not 
  145.      respond immediately to pressing Control-C.  If you press Control-C, 
  146.      and ^C appears on the screen but you are not returned to MS-DOS, 
  147.      press the Enter key.
  148.  
  149.  
  150.      Assembling Files Generated by Compilers
  151.      ------------------------------------------
  152.      Many compilers support assembly-language output.  If you experience
  153.      difficulty assembling the output of such compilers, you may need to
  154.      assemble using the /Zm option.  In some cases (for instance, if the
  155.      compiler inserts nondelimited comments or page numbers) it may be 
  156.      necessary to edit the assembly-language output by hand.
  157.  
  158.  
  159.      Using MASM 6.x Structures
  160.      --------------------------------------------
  161.      MASM 6.0 and 6.1 support a more powerful syntax for structure
  162.      definition and usage than previous versions of MASM.  This more
  163.      powerful syntax is enabled by default.  To use the older syntax,
  164.      issue the OPTION OLDSTRUCTS directive (see Appendix A of the MASM
  165.      Programmer's Guide for more information).
  166.  
  167.      Note: use of nested structures requires the new MASM 6.x syntax.
  168.      If you use nested structures, the OPTION OLDSTRUCTS directive will
  169.      be ignored for the structure which is nested.
  170.  
  171.  
  172.      Differences Between MASM 6.0 and MASM 6.1
  173.      --------------------------------------------
  174.      MASM 6.1 uses a different encoding for the CMP <reg8>,<reg8> 
  175.      instruction than MASM 6.0 did.  There is no difference in length or 
  176.      processor timing.
  177.      
  178.      
  179. ======================< Part 4: Known Assembler Bugs >====================
  180.  
  181.      Exiting from MS-DOS Critical Errors
  182.      --------------------------------------------------
  183.      MS-DOS critical errors, such as attempting to assemble a file on
  184.      a drive which does not exist or is empty, produce the "Abort, Retry
  185.      or Fail?" error message.  Selecting "Abort" when running MASM in 
  186.      MS-DOS may cause memory to be corrupted.  This problem does not 
  187.      occur when running MASM in Windows.  To avoid this problem, select
  188.      "Retry" or "Fail", as appropriate.
  189.  
  190.  
  191.      Expression Order in High-Level Conditionals
  192.      --------------------------------------------------
  193.      Comparisons in high-level conditionals cannot begin with a literal.
  194.      For instance, this comparison causes an error:
  195.  
  196.           .IF 1 == AX
  197.  
  198.      but this works properly:
  199.  
  200.           .IF AX == 1
  201.  
  202.  
  203.      Initializing Nested Structures
  204.      --------------------------------------------------
  205.      If one structure is nested within another, the inner structure's
  206.      initializer list must either be empty or include a comma between
  207.      every field.  For example, the structure INFO declared on page 123 
  208.      of the Programmer's Guide contains a structure of type DISKDRIVES,
  209.      which in turn contains three BYTE fields.  An object of type INFO
  210.      could be initialized as:
  211.  
  212.           Info1 INFO { , , , , { }}      ; Inner initializer list is blank
  213.  
  214.      or as:
  215.  
  216.           Info1 INFO { , , , , {1, 2, }} ; Commas for all three fields
  217.  
  218.      but not as:
  219.  
  220.           Info1 INFO { , , , , {1, 2 }}  ; Error: missing last comma
  221.  
  222.  
  223.      Span-Dependent Expressions used in Macros
  224.      --------------------------------------------------
  225.      MASM 6.1 evaluates macro expressions only on the first pass of 
  226.      assembly, but code and data are reevaluated on subsequent passes.
  227.      Because of this, macro expressions which depend on the span between
  228.      two addresses may not evaluate correctly.  For instance, the
  229.      following code will not evaluate correctly:
  230.  
  231.           Label1:
  232.                JMP Label2
  233.           Label2:
  234.  
  235.           REPEAT Label2 - Label1  ; Evaluates incorrectly
  236.                INC AX
  237.           ENDM
  238.  
  239.      View the listing file to determine if a questionable macro expression
  240.      was evaluated as desired.
  241.  
  242.  
  243.      Span-Dependent Equates in Macros and EXTERNDEF ABS
  244.      ---------------------------------------------------
  245.      The ABS operator causes an identifier to be exported as a relocatable
  246.      unsized constant (see Programmer's Guide page 220).  If ABS is used
  247.      with EXTERNDEF within a macro, and the constant being exported
  248.      depends on the difference between two addresses, the constant may not
  249.      be exported correctly.  In some cases, the listing file will show the
  250.      correct value, but the value in the resulting .obj will be incorrect.
  251.      For instance, the following code will not evaluate correctly:
  252.  
  253.           EXTERNDEF TableSize:ABS  ; Will not be exported correctly
  254.  
  255.           MAKETABLE MACRO
  256.           Table1 LABEL BYTE
  257.                DB 0, 1, 2
  258.           TableSize EQU $-Table1
  259.           ENDM
  260.  
  261.           SEG1 SEGMENT
  262.           MAKETABLE
  263.           SEG1 ENDS
  264.  
  265.      To avoid this problem, either use the 'PUBLIC' directive in place of 
  266.      'EXTERNDEF', or put a label before the equate, within the macro.
  267.  
  268.  
  269.      Span-Dependent Text Equates
  270.      --------------------------------------------------
  271.      The TEXTEQU operator is evaluated on the first assembly pass.  If
  272.      TEXTEQU is used with an expression that depends on the difference
  273.      between two addresses, the resulting constant may be incorrect.
  274.      For instance, the following code will not evaluate correctly:
  275.  
  276.           Label1:
  277.                JMP Label2
  278.           Label2:
  279.           WrongNum TEXTEQU %Label2-Label1 ; WrongNum will be incorrect
  280.  
  281.  
  282.      Using The /link /nologo Command Line Options
  283.      ---------------------------------------------------------
  284.      The /link command line option for ML causes all following parameters
  285.      to be passed to the linker.  If the /nologo command line option for
  286.      is passed to the linker, the linker may parse other parameters
  287.      incorrectly.  To avoid this problem, use the /nologo command line 
  288.      switch for ML rather than passing it to the linker.  For instance,
  289.      replace:
  290.  
  291.           ML hello.asm /link /nologo MYLIB.LIB
  292.  
  293.      with:
  294.  
  295.           ML /nologo hello.asm /link MYLIB.LIB
  296.  
  297.      Alternately, you may use the NMAKE utility to automate building
  298.      your project.
  299.  
  300.  
  301.      RET n Does Not Generate Epilogue
  302.      ---------------------------------------------------------
  303.      In MASM 5.1, using RET followed by a constant would cause epilogue
  304.      code to be generated.  MASM 6.1 does not generate epilogue code in
  305.      this case.
  306.